﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("-------欢 迎 进 入 游 戏 世 界-------");
            while (true)
            {
                Console.WriteLine("*******************************");
                Console.WriteLine("**********猜拳，开始***********");
                Console.WriteLine("*******************************");
                Console.WriteLine("出拳规则：1.剪刀 2.石头 3.布");

                Console.WriteLine("请选择对方角色<1.刘备 2.孙权 3.曹操>");
                Console.Write("请选择：");

                Hero hero = new Hero();
                string chioce = Console.ReadLine();
                switch (chioce)
                {
                    case "1":
                        hero = new Hero("刘备");
                        break;
                    case "2":
                        hero = new Hero("孙权");
                        break;
                    case "3":
                        hero = new Hero("曹操");
                        break;
                }
                Console.WriteLine("请输入您的姓名");
                string userName = Console.ReadLine();
                User user = new User(userName);
                Console.WriteLine($"{hero.Name} VS {user.Name} 对战");

                Console.WriteLine("开始游戏吗？（y/n）");
                string begin = Console.ReadLine();
                if (begin == "n")
                {
                    return;
                }

                Game g = new Game();
                bool v = g.Gaming(hero, user);
                if (v == false)
                {
                    return;
                }

            }
        }
    }
}
